package cn.sciento.starter.sms.service;

import cn.sciento.starter.sms.entity.SmsConfig;
import cn.sciento.starter.sms.entity.SmsMessage;
import cn.sciento.starter.sms.entity.SmsReceiver;

import java.util.List;
import java.util.Map;

public abstract class SmsService {
  protected ThreadLocal<List<String>> templateArgs = new ThreadLocal<>();
  
  public List<String> getTemplateArgs() {
    return this.templateArgs.get();
  }
  
  public SmsService setTemplateArgs(List<String> templateArgs) {
    this.templateArgs.set(templateArgs);
    return this;
  }
  
  public void remove() {
    this.templateArgs.remove();
  }
  
  public abstract String serverType();
  
  public abstract void smsSend(List<SmsReceiver> paramList, SmsConfig paramSmsConfig, SmsMessage paramSmsMessage, Map<String, String> paramMap);
}
